package cn.itcast.stream;

import java.util.stream.Stream;

/**
 * 过滤，对流进行过滤后形成新的流
 * @author LENOVO
 *
 */

public class Stream_filter {
	public static void main(String[] args) {
		//
		Stream<String> of = Stream.of("陈坤","陈彰坤","陈章杰","陈张欢");
		Stream<String> stream = of.filter((String name)->{
			return name.endsWith("坤");
		});
		stream.forEach(name->System.out.println(name));	
	}
}
